<template>
	<div id="info">
		<mainHeader></mainHeader>
		<div class="main">
			<div class="info">
				<div class="info_wrap">
					<p class="info_nav">
						<router-link :class="{'selected':$route.path == '/info/newslist'}" to="/info/newslist">行业新闻</router-link>
						<router-link :class="{'selected':$route.path == '/info/help'}" to="/info/help?id=regist">帮助中心</router-link>
					</p>
					<div class="info_module">
						<template v-if="type == 'newslist'">
							<newsList></newsList>
						</template>
						<template v-else>
							<helpDetail></helpDetail>
						</template>
						
					</div>
				</div>
			</div>
		</div>
		<mainFooter></mainFooter>
	</div>
</template>
<script>
	import * as head from '../main/main';
	import * as module from './info/main';
	export default {
		name: "info",
		components: {
			mainHeader:head.header,
            mainFooter:head.footer,
            newsList:module.newslist,
            helpDetail:module.help,
		},
		computed:{
           type() {
               return this.$route.params.type;
		   },
			url () {
            //   return this.$route.params.type == 'login' ? '/form/register' : '/form/login';
			}
		},
	}
</script>
<style lang="less" rel="stylesheet/less" type="text/css">
	@import '../../public/css/variable.less';
	.info{
		background: url(../../public/images/zx_b.jpg) no-repeat 50% 50%;
	    background-size: cover;
	    height: 920px;
	    padding-top: 91px;
	    box-sizing: border-box;
	}
	.info_wrap{
		width: 1200px;
	    padding: 0 15px;
	    box-sizing: border-box;
	    margin: 135px auto 0;
	}
	.info_nav{
		text-align: center;
		margin: 0 0 40px;
		a{
			display: inline-block;
		    width: 165px;
		    line-height: 45px;
		    border: 1px solid #fff;
		    color: #fff;
		    background: #334e5f;
		    text-align: center;
		    margin: 0 12px;
		    &:hover,&.selected{
		    	background: #d8b26a;
    			border-color: #d8b26a;
		    }
	    }
	}

	.info_module{
	   height: 555px;
	   overflow: hidden;
	}
</style>